package com.admin.commodity.service.impl;

import com.admin.commodity.pojo.MobileEndDetails;
import com.admin.commodity.mapper.MobileEndMapper;
import com.admin.commodity.service.MobileEndService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 商品详细分类 服务实现类
 * </p>
 *
 * @author 零
 * @since 2022-12-13
 */
@Service
public class MobileEndServiceImpl extends ServiceImpl<MobileEndMapper, MobileEndDetails> implements MobileEndService {
    @Autowired
    private MobileEndMapper detailsMapper;
    @Override
    public Map<String, Object> findDetails(Long pid) {
        HashMap<String, Object> hashMap = new HashMap<>();
        List<MobileEndDetails> detailsByPId = detailsMapper.getDetailsByPId(pid);
        hashMap.put("items",detailsByPId);
        return hashMap;
    }
}
